package com.psm.model;

import java.util.List;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Record;

public class PuContent extends Model<PuContent> {
	
	public static String tableName="pu_content";

    public static final PuContent me = new PuContent();
    
    /**
     * 列表数据
     * pagesize 每页数据数
     * cureentpage 当前页数
     */
    public List<Record> listJson(int pagesize,int cureentpage){
    	String sql = "SELECT * FROM "+this.tableName+" WHERE id >= (SELECT id FROM "+this.tableName+" LIMIT "+pagesize*(cureentpage-1)+", 1) LIMIT "+pagesize;
    	List<Record> list= Db.find(sql);
    	return list;
    }

}
